/*
 * Cs340 Fatboy Mafia Team
 */

package fatboy.hypeerweb;

import junit.framework.Assert;

/**
 * This state represents a "null" or non-existant node.
 * @author Preston Cowley
 * @domain a singleton instance
 */
class NullNodeState extends NodeState {

	@Override
	public Node findInsertionPoint(Node thisNode) {
		return null;	//this method is never supposed to be called on the NullNode
	}

	@Override
	protected Node getSurfaceOrLastNode(Node thisNode) {
		return null;	//this method is never supposed to be called on the NullNode
	}
//don't need
	@Override
	public boolean hasEdgeChild(Node thisNode) {
		return false;	//this method is never supposed to be called on the NullNode
	}

	@Override
	public boolean hasParent(Node thisNode) {
		return false;	//this method is never supposed to be called on the NullNode
	}
//any of this kind of
	@Override
	public NodeAddress getFirstUpDownNodeAddress(Node thisNode) {
		return null;	//this method is never supposed to be called on the NullNode
	}

	@Override
	NodeType getType() {
		return NodeType.NULL_NODE;
	}

	@Override
	public void assertNodeStateIsCorrect(Node thisNode) {
		//this should never be called
		Assert.assertTrue(thisNode.getPointers().isEmpty());
		Assert.assertTrue(thisNode.getParent() == null);
		Assert.assertTrue(thisNode.getChild() == null);
	}

}
